import json
x = '{"name":"Bill","age":63,"city":"Seatle"}'
y = json.loads(x)
# 结果是Python的字典
print(y)
z = json.dumps(y)
print(z)
# 将Python对象转换为JSON字符串
print(json.dumps({"name": "Bill", "age": 63}))
print(json.dumps(["apple", "bananas"]))
print(json.dumps(("apple", "bananas")))
print(json.dumps("hello"))
print(json.dumps(42))
print(json.dumps(31.76))
print(json.dumps(True))
print(json.dumps(False))
print(json.dumps(None))